<template>
  <div>
    <p>
      <el-form ref="select" label-width="80px">
        <el-select v-model="value" placeholder="请选择班级"  @change="dj(value)">
          <el-option v-for="item,x in select" :key="x" :label="item.className" :value="item.id"></el-option>
        </el-select>
      </el-form>
    </p>
 <table-body :selSearch="selSearch">
  
  </table-body>
  </div>
</template>

<script>
  import tableBody from "../components/tableBody.vue"
  export default {
    components:{tableBody},
    data() {
      return {
        select: {},
        value:'',
        path:'student',
        selUrl:'tbclass',
        selSearch:{
          tbclassId:''
        }
      }
    },
    methods:{
      sel(){
        this.$ajax.post('tbclass/page',{}).then(res=>{
          var result = res.data;
          if (result.success) {
            this.select=result.data.rows;
          }
        }).catch(err=>{})
      },
      dj(x){
        console.log(x)
        this.selSearch.tbclassId=x
      }
    },
    mounted() {
      this.sel()
    }
  }
</script>

<style>
</style>
